<?php

namespace common\models\work;

use Yii;

/**
 * This is the model class for table "{{%family}}".
 *
 * @property int $id ID
 * @property string $name 家庭名称
 * @property string $address 联系地址
 * @property int $members 户籍人口数量
 * @property int $status 状态
 * @property int $created_at 注册时间
 * @property int $updated_at 更新时间
 * @property int $deleted_at 注销时间
 */
class Family extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%family}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['members', 'status', 'created_at', 'updated_at', 'deleted_at'], 'integer'],
            [['name', 'address'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '家庭名称',
            'address' => '联系地址',
            'members' => '户籍人口数量',
            'status' => '状态',
            'created_at' => '注册时间',
            'updated_at' => '更新时间',
            'deleted_at' => '注销时间',
        ];
    }
}
